﻿@using Domain.Dto.Selectors
@using Domain.Model
@model Selector
@{
    Layout = "_LayoutSelector";
}
<form asp-action="Edit">
  <div class="form-group">
    <label asp-for="Name">ID</label>
    <input type="text" class="form-control" asp-for="Name">
    <span asp-validation-for="Name" class="text-danger"></span>
  </div>
  <div class="form-group">
    <label asp-for="Type">Type</label>
    <select class="form-control" asp-for="Type" asp-items="@(Enum.GetValues<SelectorType>().Select(t=>new SelectListItem(){Text=t.ToString(),Value=t.ToString()}))"></select>
    <span asp-validation-for="Type" class="text-danger"></span>
  </div>
  <div class="form-group">
    <label asp-for="Selector">Selector</label>
    <input type="text" class="form-control" asp-for="Selector">
    <span asp-validation-for="Selector" class="text-danger"></span>
  </div>
  <div class="form-check">
        <input asp-for="Multiple" class="form-check-input" type="checkbox">
        <label asp-for="Multiple" class="form-check-label">Multiple</label>
    </div>
  <div class="form-group">
    <label asp-for="Regex">Regex</label>
    <input type="text" class="form-control" asp-for="Regex">
    <span asp-validation-for="Regex" class="text-danger"></span>
  </div>
  <div class="form-group">
    <label asp-for="ParentSelectorNamesList">Parent Selectors</label>
    <select multiple asp-items=@ViewBag.SelectList class="form-control" asp-for="ParentSelectorNamesList"></select>
    <span asp-validation-for="ParentSelectorNamesList" class="text-danger"></span>
  </div>
   <div class="form-group">
       <input type="hidden" asp-for="FatherId" />
       <input type="hidden" asp-for="SiteMapId" />
   </div>
  <button type="submit" class="btn btn-primary">Submit</button>
</form>
@section Scripts {
    @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}